using System;
using System.Collections.Generic;
using System.Text;

namespace StateMachine.Runtime.Compiler
{

	public enum MessageType
	{
		Error = 1,
		Warning = 2
	}


	public class Message
	{
		private int line;
		private int column;
		private int length;
		private string message;
		private MessageType msgType;


		public Message( MessageType msgType, int line, int column, int len, string message )
		{
			if ( String.IsNullOrEmpty( message ) ) throw new ArgumentNullException( "message" );

			this.msgType = msgType;
			this.line = line;
			this.column = column;
			this.length = len;
			this.message = message;
		}


		public int Line
		{
			get { return this.line; }
		}

		public int Column
		{
			get { return this.column; }
		}

		public int Length
		{
			get { return this.length; }
		}

		public MessageType Type
		{
			get { return this.msgType; }
		}

		public string ParserMessage
		{
			get { return this.message; }
		}
	}
}
